﻿<%@ Page Title="ScrumPeak.com" Language="C#" MasterPageFile="~/Views/Shared/Site.Master"
  AutoEventWireup="true" Inherits="MvcContrib.FluentHtml.ModelViewPage<TaskModel>" %>
<%@ Import Namespace="Peak.ApplicationServices"%>
<%@ Import Namespace="Peak.Web.Controllers.HtmlExtentions"%>
<%@ Import Namespace="Peak.Resources"%>
<%@ Import Namespace="Peak.Web.Controllers.Models" %>
<%@ Import Namespace="Peak.Web" %>
<%@ Import Namespace="Peak.Core" %>
<%@ Import Namespace="Peak.Web.Controllers" %>
<asp:Content ContentPlaceHolderID="center" runat="server">  
  <div class="page-content">
    <div class="page-title">
      <%= PageTitles.EditTask %>
    </div>
   <form method="post">
      <%= this.Hidden(f => f.TaskId)%>
      <table class="form">
        <tbody>
          <tr>  
            <td align="right">
              <%= Labels.Name %>
            </td>
            <td class="fieldName">
              <%= this.TextBox(f=>f.Name) %><br />
              <%= this.ValidationMessage(f=>f.Name) %>
            </td>
          </tr>
          <tr>  
            <td align="right">
              <%= Labels.Category %>
            </td>
            <td>
              <%= this.TextBox(f=>f.Category) %><br />
              <%= this.ValidationMessage(f=>f.Category) %>
            </td>
          </tr>
          <tr>
            <td align="right">
              <%= Labels.Description %>
            </td>
            <td>
              <%= this.TextArea(f => f.Description)%>
              <%= this.ValidationMessage(f => f.Description)%>
            </td>
          </tr>   
          <tr>  
            <td align="right">
              <%= Labels.RemainingEffort %>
            </td>
            <td>
              <%= Html.TextBox("RemainingEffort",DurationParser.ToString(Model.RemainingEffort))%><br />
              <%= this.ValidationMessage(f=>f.RemainingEffort) %>
            </td>
          </tr>           
          <tr>
            <td align="right">
              <%= Labels.AssignedTo %>
            </td>
            <td>
              <%= this.UsersList(f=>f.AssignedTo) %><br /> 
              <%= this.ValidationMessage(f => f.AssignedTo)%>
            </td>
          </tr>
          <tr>
            <td align="right">
              <%= Labels.Status %>
            </td>
            <td>
              <%= Html.DropDownList("status", Enums.GetTaskStatusValues(TaskStatus.ToDo, Model.Category))%> <br />
              <%= this.ValidationMessage(f => f.Status)%>
            </td>
          </tr>                             
          <tr>
            <td>
            </td>
            <td>
              <%= Html.OkButton()%>
              <%= Html.CancelButton() %>
            </td>
          </tr>
        </tbody>
      </table>
    </form>  
  </div>
</asp:Content>
